obj-m		:= buzzer.o
#KERNEL		:= /home/yt/test/linux-4.1.19
KERNEL		:= /home/yt/test/x6818/x6818_linux_SDK/kernel

all:
	@make -C $(KERNEL) M=`pwd` modules

clean:
	@make -C $(KERNEL) M=`pwd` clean

install:
	@sudo dmesg -c > /dev/null
	@sudo insmod buzzer.ko
	@sudo chmod 0666 /dev/leds
	@dmesg
	@echo "\033[43m`ls -l /dev/buzzer`\033[0m"

uninstall:
	@sudo rmmod led_buzzer
	@sudo dmesg -c
